package cn.tannn.surenessdemo.controller;

import cn.jdevelops.annotation.mapping.PathRestController;
import cn.tannn.surenessdemo.sureness.annotation.ApiMapping;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @author tnnn
 * @version V1.0
 * @date 2022-07-17 00:55
 */
@Api(tags = "放行测试", value = "放行测试")
@PathRestController("filter")
@ApiSupport(order = 9)
public class TestFilterController {


    @ApiOperation(value = "配置文件放行", notes = "放行测试")
    @GetMapping("hi")
    @ApiOperationSupport(order = 1)
    public String test(){
        return "配置文件放行";
    }

    @ApiOperation(value = "checkToken = false", notes = "放行测试")
    @ApiMapping(value = "apimapping",checkToken = false,method = RequestMethod.GET)
    @ApiOperationSupport(order = 2)
    public String apimapping(){
        return "测试apimapping放行接口checkToken = false";
    }

    @ApiOperation(value = "checkToken = true", notes = "放行测试")
    @ApiMapping(value = "apimapping2",method = RequestMethod.GET)
    @ApiOperationSupport(order = 3)
    public String apimapping2(){
        return "测试apimapping放行接口checkToken = true";
    }


    @ApiOperation(value = "不放行", notes = "放行测试")
    @GetMapping("lanjie")
    @ApiOperationSupport(order = 4)
    public String lanjie(){
        return "不放行";
    }

}
